﻿using System.Collections;
using System.Collections.Generic;
using System.Linq;
using WeiTap.Validator.PropertyValidators;

namespace WeiTap.Validator
{
    public interface IValidatorDescriptor
    {
        /// <summary>
        /// 获取一个属性的显示名称
        /// </summary>
        /// <param name="property"></param>
        /// <returns></returns>
        string GetName(string property);
        /// <summary>
        /// 获取所有属性的验证器接口，并且按属性分组
        /// </summary>
        /// <returns></returns>
        ILookup<string,IPropertyValidator> GetMembersWithValidators();
        IEnumerable<IPropertyValidator> GetValidatorsForMember(string property);
        IEnumerable<IValidationRule> GetRulesForMember(string property);
    }
}